expand array to a certain size python

42

return some_list[:target_len] + [0 for _ in range(target_len - len(some_list))]
return some_list[:target_len] + [0 for _ in range(target_len - len(some_list))]
return some_list[:target_len] + [0 for _ in range(target_len - len(some_list))]
return some_list[:target_len] + [0 for _ in range(target_len - len(some_list))]
return some_list[:target_len] + [0 for _ in range(target_len - len(some_list))]
return some_list[:target_len] + [0 for _ in range(target_len - len(some_list))]
return some_list[:target_len] + [0 for _ in range(target_len - len(some_list))]
return some_list[:target_len] + [0 for _ in range(target_len - len(some_list))]

Comments

Submit
0 Comments